package com.zhanghu.backendZray.pojo.dto;

import com.zhanghu.backendZray.pojo.entity.User;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * @author ZhangDong
 * @date 2024/7/21 18:29
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class UserTokenInfo {

    private Integer id;
    private String name;
    private String phone;
    private String wxNickName;
    private String wxAvatar;
    private String loginToken;
    private LocalDateTime tokenExpireTime;

    public UserTokenInfo(User user) {
        this.id = user.getId();
        this.name = user.getName();
        this.phone = user.getPhone();
        this.wxNickName = user.getWxNickName();
        this.wxAvatar = user.getWxAvatar();
    }
}
